/**
  \mainpage
  ETFRoot project, Anyang Normal University && IMP-CAS
  \brief analyse the raw data, including data mapping, tracking and PID
  \author SUN Yazhou, asia.rabbit@163.com
  \since 2021-11-22
  \date 2021-11-22 last modified
  \attention
  changelog
  <table>
  <tr>  <th>Date         <th>Author      <th>Description                   </tr>
  <tr>  <td>2021-11-22   <td>Asia Sun    <td>file created                  </tr>
  </table>

  \copyright Copyright (c) 2021 Anyang Normal U. && IMP-CAS with LGPLv3 LICENSE
*/

#include <cstdlib>
#include <iostream>
#include <unistd.h>
#include <TString.h>
#include <TStopwatch.h>

#include "FairRunOnline.h"
#include "FairRootFileSink.h"
#include "FairRuntimeDb.h"
#include "FairParRootFileIo.h"

// PXI source header files
#include "ETFPXIOfflineSource.h"
#include "ETFPXIUnpacker.h"
// VME source header files
#include "ETFVMEOfflineSource.h"
#include "ETFUserVMEUnpacker.h"
// Mixed source header files
#include "ETFMixedOfflineSource.h"
#include "ETFUserAnaTask.h"

#include "ETFUserUnpackTask.h"
#include "ETFMsg.h"

#include "ETFParaManager.h"

using std::cout;
using std::endl;

#include "ana.C"

// string dataPrefix = "../data/C16/C5mm/2/";
// string pxi = dataPrefix + "20180708_1530.dat";
// string vme = dataPrefix + "20180708.005";

int main(int argc, char const *argv[]){
  if(argc < 3){ std::cerr << "usage: ./ana <pxifile> <vmefile>" << endl; exit(1); }
  static ETFParaManager *PARA = ETFParaManager::Instance();
  PARA->SetPXIFile(argv[1]); PARA->SetVMEFile(argv[2]);

  ana();

  return 0;
} // end the main function
